package com.university.vo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Company entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "company", catalog = "university")

public class Company implements java.io.Serializable {

	// Fields

	private Integer companyId;
	private String companyName;
	private String companyRegisterNumber;
	private String companyLinkman;
	private String companyLegalPerson;
	private String companyTelphone;
	private String companyUrl;
	private Integer companyScale;
	private String companyAddress;
	private String companyUscc;
	private Timestamp companyCreateTime;
	private Timestamp companyRunBeginTime;
	private Timestamp companyRunEndTime;
	private String companyOibc;
	private String companyRegisterOffice;
	private Boolean companyIsRunning;
	private String companyRegisterAddress;
	private Integer companyRegisteredAssets;
	private String companyType;
	private String companyInfo;
	private Boolean companyEnable;
	private Set<City> cities = new HashSet<City>(0);
	private Set<Attention> attentions = new HashSet<Attention>(0);
	private Set<Companyaccount> companyaccounts = new HashSet<Companyaccount>(0);
	private Set<Parttime> parttimes = new HashSet<Parttime>(0);
	private Set<Studentcomplain> studentcomplains = new HashSet<Studentcomplain>(0);
	private Set<Companycomplain> companycomplains = new HashSet<Companycomplain>(0);
	private Set<Studentcomment> studentcomments = new HashSet<Studentcomment>(0);

	// Constructors

	/** default constructor */
	public Company() {
	}

	@Override
	public String toString() {
		return "Company [companyId=" + companyId + ", companyName=" + companyName + ", companyRegisterNumber="
				+ companyRegisterNumber + ", companyLinkman=" + companyLinkman + ", companyLegalPerson="
				+ companyLegalPerson + ", companyTelphone=" + companyTelphone + ", companyUrl=" + companyUrl
				+ ", companyScale=" + companyScale + ", companyAddress=" + companyAddress + ", companyUscc="
				+ companyUscc + ", companyCreateTime=" + companyCreateTime + ", companyRunBeginTime="
				+ companyRunBeginTime + ", companyRunEndTime=" + companyRunEndTime + ", companyOibc=" + companyOibc
				+ ", companyRegisterOffice=" + companyRegisterOffice + ", companyIsRunning=" + companyIsRunning
				+ ", companyRegisterAddress=" + companyRegisterAddress + ", companyRegisteredAssets="
				+ companyRegisteredAssets + ", companyType=" + companyType + ", companyInfo=" + companyInfo
				+ ", companyEnable=" + companyEnable + ", cities=" + cities + ", attentions=" + attentions
				+ ", companyaccounts=" + companyaccounts + ", parttimes=" + parttimes + ", studentcomplains="
				+ studentcomplains + ", companycomplains=" + companycomplains + ", studentcomments=" + studentcomments
				+ "]";
	}

	/** full constructor */
	public Company(String companyName, String companyRegisterNumber, String companyLinkman, String companyLegalPerson,
			String companyTelphone, String companyUrl, Integer companyScale, String companyAddress, String companyUscc,
			Timestamp companyCreateTime, Timestamp companyRunBeginTime, Timestamp companyRunEndTime, String companyOibc,
			String companyRegisterOffice, Boolean companyIsRunning, String companyRegisterAddress,
			Integer companyRegisteredAssets, String companyType, String companyInfo, Boolean companyEnable,
			Set<City> cities, Set<Attention> attentions, Set<Companyaccount> companyaccounts, Set<Parttime> parttimes,
			Set<Studentcomplain> studentcomplains, Set<Companycomplain> companycomplains,
			Set<Studentcomment> studentcomments) {
		this.companyName = companyName;
		this.companyRegisterNumber = companyRegisterNumber;
		this.companyLinkman = companyLinkman;
		this.companyLegalPerson = companyLegalPerson;
		this.companyTelphone = companyTelphone;
		this.companyUrl = companyUrl;
		this.companyScale = companyScale;
		this.companyAddress = companyAddress;
		this.companyUscc = companyUscc;
		this.companyCreateTime = companyCreateTime;
		this.companyRunBeginTime = companyRunBeginTime;
		this.companyRunEndTime = companyRunEndTime;
		this.companyOibc = companyOibc;
		this.companyRegisterOffice = companyRegisterOffice;
		this.companyIsRunning = companyIsRunning;
		this.companyRegisterAddress = companyRegisterAddress;
		this.companyRegisteredAssets = companyRegisteredAssets;
		this.companyType = companyType;
		this.companyInfo = companyInfo;
		this.companyEnable = companyEnable;
		this.cities = cities;
		this.attentions = attentions;
		this.companyaccounts = companyaccounts;
		this.parttimes = parttimes;
		this.studentcomplains = studentcomplains;
		this.companycomplains = companycomplains;
		this.studentcomments = studentcomments;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "company_id", unique = true, nullable = false)

	public Integer getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	@Column(name = "company_name", length = 200)

	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Column(name = "company_registerNumber", length = 15)

	public String getCompanyRegisterNumber() {
		return this.companyRegisterNumber;
	}

	public void setCompanyRegisterNumber(String companyRegisterNumber) {
		this.companyRegisterNumber = companyRegisterNumber;
	}

	@Column(name = "company_linkman", length = 10)

	public String getCompanyLinkman() {
		return this.companyLinkman;
	}

	public void setCompanyLinkman(String companyLinkman) {
		this.companyLinkman = companyLinkman;
	}

	@Column(name = "company_legalPerson", length = 10)

	public String getCompanyLegalPerson() {
		return this.companyLegalPerson;
	}

	public void setCompanyLegalPerson(String companyLegalPerson) {
		this.companyLegalPerson = companyLegalPerson;
	}

	@Column(name = "company_telphone", length = 20)

	public String getCompanyTelphone() {
		return this.companyTelphone;
	}

	public void setCompanyTelphone(String companyTelphone) {
		this.companyTelphone = companyTelphone;
	}

	@Column(name = "company_URL", length = 500)

	public String getCompanyUrl() {
		return this.companyUrl;
	}

	public void setCompanyUrl(String companyUrl) {
		this.companyUrl = companyUrl;
	}

	@Column(name = "company_scale")

	public Integer getCompanyScale() {
		return this.companyScale;
	}

	public void setCompanyScale(Integer companyScale) {
		this.companyScale = companyScale;
	}

	@Column(name = "company_address", length = 200)

	public String getCompanyAddress() {
		return this.companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	@Column(name = "company_USCC", length = 20)

	public String getCompanyUscc() {
		return this.companyUscc;
	}

	public void setCompanyUscc(String companyUscc) {
		this.companyUscc = companyUscc;
	}

	@Column(name = "company_createTime", length = 19)

	public Timestamp getCompanyCreateTime() {
		return this.companyCreateTime;
	}

	public void setCompanyCreateTime(Timestamp companyCreateTime) {
		this.companyCreateTime = companyCreateTime;
	}

	@Column(name = "company_runBeginTime", length = 19)

	public Timestamp getCompanyRunBeginTime() {
		return this.companyRunBeginTime;
	}

	public void setCompanyRunBeginTime(Timestamp companyRunBeginTime) {
		this.companyRunBeginTime = companyRunBeginTime;
	}

	@Column(name = "company_runEndTime", length = 19)

	public Timestamp getCompanyRunEndTime() {
		return this.companyRunEndTime;
	}

	public void setCompanyRunEndTime(Timestamp companyRunEndTime) {
		this.companyRunEndTime = companyRunEndTime;
	}

	@Column(name = "company_OIBC", length = 12)

	public String getCompanyOibc() {
		return this.companyOibc;
	}

	public void setCompanyOibc(String companyOibc) {
		this.companyOibc = companyOibc;
	}

	@Column(name = "company_registerOffice", length = 200)

	public String getCompanyRegisterOffice() {
		return this.companyRegisterOffice;
	}

	public void setCompanyRegisterOffice(String companyRegisterOffice) {
		this.companyRegisterOffice = companyRegisterOffice;
	}

	@Column(name = "company_isRunning")

	public Boolean getCompanyIsRunning() {
		return this.companyIsRunning;
	}

	public void setCompanyIsRunning(Boolean companyIsRunning) {
		this.companyIsRunning = companyIsRunning;
	}

	@Column(name = "company_registerAddress", length = 200)

	public String getCompanyRegisterAddress() {
		return this.companyRegisterAddress;
	}

	public void setCompanyRegisterAddress(String companyRegisterAddress) {
		this.companyRegisterAddress = companyRegisterAddress;
	}

	@Column(name = "company_registeredAssets")

	public Integer getCompanyRegisteredAssets() {
		return this.companyRegisteredAssets;
	}

	public void setCompanyRegisteredAssets(Integer companyRegisteredAssets) {
		this.companyRegisteredAssets = companyRegisteredAssets;
	}

	@Column(name = "company_type", length = 50)

	public String getCompanyType() {
		return this.companyType;
	}

	public void setCompanyType(String companyType) {
		this.companyType = companyType;
	}

	@Column(name = "company_info", length = 2000)

	public String getCompanyInfo() {
		return this.companyInfo;
	}

	public void setCompanyInfo(String companyInfo) {
		this.companyInfo = companyInfo;
	}

	@Column(name = "company_enable", insertable = false)

	public Boolean getCompanyEnable() {
		return this.companyEnable;
	}

	public void setCompanyEnable(Boolean companyEnable) {
		this.companyEnable = companyEnable;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinTable(name = "companyjobarea", catalog = "university", joinColumns = {
			@JoinColumn(name = "companyJobArea_compantyId", updatable = false) }, inverseJoinColumns = {
					@JoinColumn(name = "companyJobArea_cityId", updatable = false) })

	public Set<City> getCities() {
		return this.cities;
	}

	public void setCities(Set<City> cities) {
		this.cities = cities;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Attention> getAttentions() {
		return this.attentions;
	}

	public void setAttentions(Set<Attention> attentions) {
		this.attentions = attentions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Companyaccount> getCompanyaccounts() {
		return this.companyaccounts;
	}

	public void setCompanyaccounts(Set<Companyaccount> companyaccounts) {
		this.companyaccounts = companyaccounts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Parttime> getParttimes() {
		return this.parttimes;
	}

	public void setParttimes(Set<Parttime> parttimes) {
		this.parttimes = parttimes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Studentcomplain> getStudentcomplains() {
		return this.studentcomplains;
	}

	public void setStudentcomplains(Set<Studentcomplain> studentcomplains) {
		this.studentcomplains = studentcomplains;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Companycomplain> getCompanycomplains() {
		return this.companycomplains;
	}

	public void setCompanycomplains(Set<Companycomplain> companycomplains) {
		this.companycomplains = companycomplains;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")

	public Set<Studentcomment> getStudentcomments() {
		return this.studentcomments;
	}

	public void setStudentcomments(Set<Studentcomment> studentcomments) {
		this.studentcomments = studentcomments;
	}

}